//
//  UIViewController+MSNavigationUitls.m
//  MSJD
//
//  Created by 箭军刘 on 2018/12/23.
//  Copyright © 2018 xiangbo. All rights reserved.
//

#import "UIViewController+MSNavigationUitls.h"

@implementation UIViewController (MSNavigationUitls)

- (void)addBackNavigationBarButtonWithSEL:(SEL)backButtonClickSelector {
    UIButton *button = [UIButton buttonWithType:UIButtonTypeCustom];
    // 修改按钮的点击区域
    button.size = CGSizeMake(54, 44);
    [button setImage:[UIImage imageNamed:@"back"] forState:UIControlStateNormal];
    [button addTarget:self action:backButtonClickSelector forControlEvents:UIControlEventTouchUpInside];
    [button setImageEdgeInsets:UIEdgeInsetsMake(0, 0, 0, 22)];
    UIBarButtonItem *backButtonItem = [[UIBarButtonItem alloc] initWithCustomView:button];
    self.navigationItem.leftBarButtonItem = backButtonItem;
}

@end
